package com.dudu.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dudu.mapper.DriverMapper;
import com.dudu.pojo.Driver;
import com.dudu.service.DriverLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: 小河
 * @Description:
 * @Date: 2024-07-17 10:34:07
 * @Version: 1.0
 */
@Service
public class DriverLoginServiceImpl extends ServiceImpl<DriverMapper,Driver> implements DriverLoginService {
    @Autowired // 自动注入UserMapper实例
    private DriverMapper driverMapper;

    @Override
    public Driver saveDriver(Driver diver) {
        driverMapper.insert(diver); // 将用户信息插入数据库
        return diver; // 返回保存后的用户对象
    }
}
